let Router=require('koa-router')
let router=new Router({prefix:'/order'})
let {auth} =require('../middleware/auth')
let {create,getOrder,updateOrder} =require('../control/order.js')
let {validate}=require('../middleware/order.js')
router.post('/',auth,validate({
    address_id:"string",
    goods_info:'string',
    total:'string'
}),create)

router.get('/',auth,getOrder)

router.post('/update/:id',auth,validate({
    status:'string'
}),updateOrder)


module.exports=router